home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_147 / sys / bsd / bsd.zoo / Makefile < prev    next >
Makefile  |  1988-07-25  |  3KB  |  119 lines

  1. # Makefile for Mg 2a
  2.  
  3. SYS    = bsd
  4. LIBS    = -ltermcap
  5. # CDEFS gets defines, and gets passed to lint. CFLAGS gets flags, and doesn't
  6. # get passed to lint.
  7. #
  8. # (Common) compile-time options:
  9. #
  10. #    DO_METAKEY    -- if bit 7 is set for a key, treat like a META key
  11. #    STARTUP        -- look for and handle initialization file
  12. #    SYMBLINK    -- follow symbolic links the same as the BSD kernel
  13. #    XKEYS        -- use termcap function key definitions. Warning -
  14. #                XKEYS and bsmap mode do _not_ get along.
  15. #    BACKUP        -- enable "make-backup-files"
  16. #    PREFIXREGION    -- enable function "prefix-region"
  17. #    REGEX        -- create regular expression functions
  18. #
  19. #CDEFS    =  -DDO_METAKEY
  20. CDEFS    =  -DDO_METAKEY -DPREFIXREGION
  21. CFLAGS    = -g $(CDEFS)
  22.  
  23. # Objects which only depend on the "standard" includes
  24. OBJS    = basic.o dir.o dired.o file.o line.o match.o paragraph.o \
  25.       random.o region.o search.o version.o window.o word.o
  26.  
  27. # Those with unique requirements
  28. IND    = buffer.o display.o echo.o extend.o help.o kbd.o keymap.o \
  29.       macro.o main.o modes.o regex.o re_search.o
  30.  
  31. # System dependent objects
  32. OOBJS = cinfo.o spawn.o ttyio.o tty.o ttykbd.o
  33.  
  34. OBJ = $(OBJS) $(IND) $(OOBJS) fileio.o
  35.  
  36. OSRCS    = cinfo.c fileio.c spawn.c ttyio.c tty.c ttykbd.c
  37. SRCS    = basic.c dir.c dired.c file.c line.c match.c paragraph.c \
  38.       random.c region.c search.c version.c window.c word.c \
  39.       buffer.c display.c echo.c extend.c help.c kbd.c keymap.c \
  40.       macro.c main.c modes.c regex.c re_search.c
  41.  
  42. OINCS =    ttydef.h sysdef.h chrdef.h
  43. INCS =    def.h
  44.  
  45. mg:    $(OBJ)
  46.     cc $(CFLAGS) -o mg $(OBJ) $(LIBS)
  47.  
  48. # strip mg once you're satisfied it'll run -- makes it much smaller
  49. strip:
  50.     strip mg
  51.  
  52. lint: $(SRCS) $(OSRCS) $(INCS) $(OINCS)
  53.     lint -ahbz $(CDEFS) $(SRCS) $(OSRCS)
  54.  
  55. $(OBJ):        $(INCS) $(OINCS)
  56.  
  57.  
  58. dir.r search.o:    $(INCS) $(OINCS)
  59.  
  60. regex.o re_search.o:    $(INCS) $(OINCS) regex.h
  61.  
  62. kbd.o:    $(INCS) $(OINCS) macro.h kbd.h key.h
  63.  
  64. macro.o main.o:    $(INCS) $(OINCS) macro.h
  65.  
  66. buffer.o display.o keymap.o help.o modes.o dired.o fileio.o: \
  67.     $(INCS) $(OINCS) kbd.h
  68.  
  69. extend.o:    $(INCS) $(OINCS) kbd.h macro.h key.h
  70.  
  71. help.o:    $(INCS) $(OINCS) kbd.h key.h macro.h
  72.  
  73. echo.o:    $(INCS) $(OINCS) key.h macro.h
  74.  
  75. $(OOBJS):    $(INCS) $(OINCS)
  76.  
  77. sysdef.h:    sys/$(SYS)/sysdef.h    # Update links, if needed.
  78.     rm -f sysdef.h
  79.     ln sys/$(SYS)/sysdef.h .
  80.  
  81. ttydef.h:    sys/default/ttydef.h
  82.     rm -f ttydef.h
  83.     ln sys/default/ttydef.h .
  84.  
  85. chrdef.h:    sys/default/chrdef.h
  86.     rm -f chrdef.h
  87.     ln sys/default/chrdef.h .
  88.  
  89. fileio.c:    sys/$(SYS)/fileio.c
  90.     rm -f fileio.c
  91.     ln sys/$(SYS)/fileio.c .
  92.  
  93. spawn.c:    sys/$(SYS)/spawn.c
  94.     rm -f spawn.c
  95.     ln sys/$(SYS)/spawn.c .
  96.  
  97. tty.c:        sys/default/tty.c
  98.     rm -f tty.c
  99.     ln sys/default/tty.c .
  100.  
  101. ttyio.c:    sys/$(SYS)/ttyio.c
  102.     rm -f ttyio.c
  103.     ln sys/$(SYS)/ttyio.c .
  104.  
  105. ttykbd.c:    sys/default/ttykbd.c
  106.     rm -f ttykbd.c
  107.     ln sys/default/ttykbd.c .
  108.  
  109. cinfo.c:    sys/default/cinfo.c
  110.     rm -f cinfo.c
  111.     ln sys/default/cinfo.c .
  112.  
  113. port: $(SRCS) $(INCS)
  114.     rm -f port
  115.     tar cfb port 1 $?
  116.  
  117. clean:;    rm -f $(OBJ) $(OSRCS) $(OINCS)
  118.  
  119.